<!doctype html>
<title>Using push</title>

<script>

//Create an empty array
var closet = [];

//Add three things
closet.push("hat");
closet.push("umbrella");
closet.push("katana");

//View the entire array contents 
console.log("Entire array: " + closet);

//View individual elements
console.log("Element 0: " + closet[0]); 
console.log("Element 1: " + closet[1]); 
console.log("Element 2: " + closet[2]); 

</script>